#include<iostream>
using std::cout;
using std::cin;
using std::endl;

struct ab
{
	int a;
	int b;
	struct ab * next;
};
typedef struct ab Sum;

int main(void)
{
	Sum * head = NULL;
	Sum * temp = NULL;  //临时存放当前节点
	Sum * tail = NULL;  
	int t_a,t_b;
	cin >> t_a >> t_b;
	while( !(t_a==0 && t_b==0) )
	{
		temp = new Sum;
		temp->a = t_a;
		temp->b = t_b;
		temp->next = NULL;
		if (head == NULL)
		{
			head = temp;
			tail = temp;
		}
		else
		{
			tail->next = temp;
			tail = temp;
		}
		cin >> t_a >> t_b;
	}
	temp = head;
	while( ! temp==NULL )
	{
		cout << temp->a + temp->b <<endl;
		temp=temp->next;
	}
	while(! head==NULL )
	{
		temp = head;
		head = head->next;
		delete temp;	
	}
    return 0;
}